Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
what is the functionality of "@jsx react.dom" adding in top of every file?

what is the functionality of:

 /** @jsx React.DOM */

I have seen this line is added on top of so many files in my current project but I am very confused why its added. :(

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Since React v0.12, there's no more /** @jsx React.DOM */, see here.

They call it "The @jsx Pragma". It was used to allow you to specific how the output of the React Transformer should look.

So, back in the days, when compiling JSX expressions to JavaScript, they defaulted to React.createElement() calls. But you could modify this behavior with the beginning /** @jsx React.DOM */ comment. The idea was to make the transform more generic and allow you to specific how the output should look.

Not anymore. The React team shares in their release v0.12 notes:

We have wanted to do this since before we even open sourced React. No more /** @jsx React.DOM */!. The React specific JSX transform assumes you have React in scope (which had to be true before anyway).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda